//
//  MyBalanceSecendCell.swift
//  XiaoJingMallSwift
//
//  Created by beisheng03 on 2017/9/6.
//  Copyright © 2017年 beisheng. All rights reserved.
//

import UIKit

protocol MyBalanceSecendCellDelegate : NSObjectProtocol {
    
    func rightGetMoneyDidTap()


}

class MyBalanceSecendCell: BaseTableViewCell {

    @IBOutlet weak var rigthBtn: UIButton!
    @IBOutlet weak var leftBtn: UIButton!
    
    weak var delegate : MyBalanceSecendCellDelegate?
    
    
    override func awakeFromNib() {
        super.awakeFromNib()
        contentView.backgroundColor = UIColor.white
        
        leftBtn.addCornerAndBorder(borderColor: UIColor.red, borderWidth: 1, masksToBounds: true, cornerRadius: 18)
        
        rigthBtn.addCornerAndBorder(borderColor: UIColor.colorWith(r: 0, g: 188, b: 137), borderWidth: 1, masksToBounds: true, cornerRadius: 18)
        // Initialization code
    }
    
    
    @IBAction func leftBtnDidTap(_ sender: UIButton) {
        
        viewController().navigationController?.pushViewController(RechargeCashVC(), animated: true)
    }
    
    
    @IBAction func rightBtnDidTap(_ sender: UIButton) {
        
        delegate?.rightGetMoneyDidTap()
        
       

    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
